export default {
  watch: {
    chartData: {
      handler (newVal, oldVal) {
        if (newVal === '') return []
        if (newVal !== oldVal) {
          this.$nextTick(() => {
            this.initChart()
            // if (this.playItem) this.playItem()
          })
        }
      },
      // 配置立即执行属性
      immediate: true,
      deep: true
    },
    xData: {
      handler (newVal, oldVal) {
        if (newVal === '') return []
        if (newVal !== oldVal) {
          this.$nextTick(() => {
            this.initChart()
          })
        }
      },
      // 配置立即执行属性
      immediate: true,
      deep: true
    }
  }
}
